package com.iukcy.hight.service.impl;

import com.iukcy.hight.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @program: kbase-Utils
 * @description: redis工具类
 * @author: zhangzhufu
 * @create: 2020-08-11 09:03:19
 **/
@Service
public class RedisServiceImpl implements RedisService {
    @Autowired
    RedisTemplate redisTemplate;

    @Override
    public String redisGet(String key) {
        return (String) redisTemplate.opsForValue().get(key);
    }

    @Override
    public void redisSet(String key, String value) {
        redisTemplate.opsForValue().set(key, value);
    }
}